package com.kdzy.lshy.common.controller;

import com.kdzy.lshy.common.service.WeChatService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: hanrui
 * @Date: 2018/6/16
 * @Description: 根据openid获取微信信息
 */

@RestController
@CrossOrigin("*")
@RequestMapping(value = "/faced")
@Api(value = "WeChatUserController")
public class WeChatUserController{

    @Autowired
    private WeChatService weChatService;

    /**
     * 获取身份信息
     *
     * 参数: param
     *
     * @return
     */
    @RequestMapping("/user/wechat/info")
    @ApiOperation(notes = "/user/wechat/info", httpMethod = "POST", value = "获取身份信息")
    public Object getWeChatInfo(String code){

        return  weChatService.getWeChatInfo(code);
    }
}
